﻿<UserControl
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:bsl="clr-namespace:Silverlight4Demo.Utility.CustomControl;assembly=Silverlight4Demo.Utility"
    xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk" x:Class="Silverlight4ApplicationDemo.MainPage"
    mc:Ignorable="d"
    d:DesignHeight="600" d:DesignWidth="800">

    <Grid x:Name="LayoutRoot" Background="White"  >
        <Grid.RowDefinitions>
            <RowDefinition Height="0.163*"/>
            <RowDefinition Height="0.837*"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.15*"/>
            <ColumnDefinition Width="0.85*"/>
        </Grid.ColumnDefinitions>
        <bsl:CoolDownButton CoolDownSeconds="3" Margin="8,0,8,8" Name="CoolDownBtn"/>
        <Grid Grid.Column="1" Margin="8" Grid.Row="1">
            <Grid.RowDefinitions>
                <RowDefinition Height="0.86*"/>
                <RowDefinition Height="0.14*"/>
            </Grid.RowDefinitions>
            <sdk:DataGrid x:Name="DataTable"  Margin="10"  BorderThickness="5" ColumnHeaderHeight="50" >
                <sdk:DataGrid.Columns>
                    <sdk:DataGridTemplateColumn CanUserResize="True" DisplayIndex="-1"  Header="HandAction" IsReadOnly="False" MaxWidth="Infinity" MinWidth="0"  Visibility="Visible" Width="Auto">
                        <sdk:DataGridTemplateColumn.CellTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition />
                                    </Grid.ColumnDefinitions>
                                    <Border  
                            Margin="2" CornerRadius="4"  
                            BorderBrush="Black" BorderThickness="1" />
                                    <Rectangle  
                            Margin="4" Fill="White" Grid.Column="0" />
                                    <Border  
                            Margin="2" CornerRadius="4" BorderBrush="Black" 
                            BorderThickness="1" Grid.Column="1" />
                                    <Rectangle  
                            Margin="4" Fill="White" Grid.Column="1" />
                                    <TextBlock  
                            Text="Del" HorizontalAlignment="Center" 
                            VerticalAlignment="Center" Grid.Column="0" />
                                    <TextBlock  
                            Text="Chk" HorizontalAlignment="Center" 
                            VerticalAlignment="Center" Grid.Column="1" />
                                </Grid>
                            </DataTemplate>
                        </sdk:DataGridTemplateColumn.CellTemplate>
                    </sdk:DataGridTemplateColumn>
                </sdk:DataGrid.Columns>
            </sdk:DataGrid>

        </Grid>
        <TextBlock Grid.Column="1" HorizontalAlignment="Left" Margin="37,19,0,0" TextWrapping="Wrap" Text="name1" VerticalAlignment="Top"/>
        <TextBlock Grid.Column="1" HorizontalAlignment="Left" Margin="37,0,0,31" TextWrapping="Wrap" Text="name2" VerticalAlignment="Bottom"/>
        <TextBox x:Name="tb_1" Grid.Column="1" HorizontalAlignment="Left" Margin="118,15,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="151" Text="{Binding Name1, Mode=TwoWay}"/>
        <TextBox x:Name="tb_2" Grid.Column="1" HorizontalAlignment="Left" Margin="118,0,0,27" TextWrapping="Wrap" VerticalAlignment="Bottom" Width="151" Text="{Binding Text, Mode=OneWay, ElementName=tb_1}"/>
        <TextBlock x:Name="lab_2" Grid.Column="1" Margin="326,19,300,0" TextWrapping="Wrap" VerticalAlignment="Top" d:LayoutOverrides="Width" Text="{Binding Name1, Mode=TwoWay}"/>
    </Grid>
</UserControl>
